<div class="main">
        <Spin size="large" fix v-if="spinShow"></Spin>
    <script type="text/javascript">
        $(document).ready(function(){
//            login("123","123");//測試用的，不用密碼登錄。以後要注釋
            $(".btn-login").click(function(){
                var username=$("[name=username]").val();
                var password=$("[name=password]").val();
                login(username,password);
            });
            //点击enter 进行登录
                $("input").bind("keyup",function(){
                    if (event.keyCode == 13) {
                        $(".btn-login").trigger("click");
                    }
                });
            // $(".login-txt-left").click(function () {
            //     $(".main-div").load("register.html")
            // })
        });
    </script>
    <img class="logo" src="images/logo1.png" alt="">
    <div class="login">
        <div class="h20"></div>
        <input type="text" class="web-input" :placeholder="lang.id" name="username">
        <input type="password" class="web-input" :placeholder="lang.password" name="password">
        <p class="login-txt-left"><a href="./register">{{lang.register}}</a></p>
        <p class="login-txt-right"><a href="./findpass">{{lang.findpass}}</a></p>
        <div class="btn-login-div">
            <button class="btn-login" >{{lang.login}}</button>
        </div>
        <!--第三方登錄-->
        <div class="else-login">
            <img src="images/facebook.png" alt=""  class="else-login-img first">
            <img src="images/google.png" alt=""  class="else-login-img">
            <img src="images/mall.png" alt="" class="else-login-img">
            <img src="images/Three-QRCode1.png" alt=""  class="else-login-img">
        </div>
    </div>

</div>
<script>
    var page=new Vue({
        el:'.main',
        data:{
            lang:lang,
            spinShow:false
        },
        methods:{
            loginerr(){
                var t=this;
                this.$Modal.error({
                            title: t.lang.error,
                            content: t.lang.loginerr,
                            okText: t.lang.ok,
                            cancelText: t.lang.cancel
                        });
            }
        }
    })
</script>